<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmDialog.cpp -->
  <title>QCtmDialog Class | QCustomUi 1.10.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">QCustomUi 1.10.0</a></li>
<li><a href="index.html">QCustomUi</a></li>
<li>QCtmDialog</li>
<li id="buildversion">QCustomUi 1.10.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QCtmDialog Class</h1>
<!-- $$$QCtmDialog-brief -->
<p>这是一个模态窗口，类似于<a href="https://doc.qt.io/qt/qdialog.html">QDialog</a>，去掉了系统的边框和标题栏，用自定义的标题栏替代. <a href="#details">More...</a></p>
<!-- @@@QCtmDialog -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmDialog.h&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="https://doc.qt.io/qt/qdialog.html">QDialog</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qctmdigitkeyboard.html">QCtmDigitKeyboard</a> and <a href="qctmmessagebox.html">QCtmMessageBox</a></p>
</td></tr></table></div>
<ul>
<li><a href="qctmdialog-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#QCtmDialog">QCtmDialog</a></b>(QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#dtor.QCtmDialog">~QCtmDialog</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#addMoveBar">addMoveBar</a></b>(QWidget *<i>moveBar</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#centralWidget">centralWidget</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#removeMoveBar">removeMoveBar</a></b>(QWidget *<i>moveBar</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#setCentralWidget">setCentralWidget</a></b>(QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#setTitleBar">setTitleBar</a></b>(QCtmTitleBar *<i>titleBar</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmTitleBar *</td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#titleBar">titleBar</a></b>() const</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#eventFilter">eventFilter</a></b>(QObject *<i>o</i>, QEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#hideEvent">hideEvent</a></b>(QHideEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qctmdialog.html#nativeEvent">nativeEvent</a></b>(const QByteArray &amp;<i>eventType</i>, void *<i>message</i>, qintptr *<i>result</i>) override</td></tr>
</table></div>
<!-- $$$QCtmDialog-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
</div>
<!-- @@@QCtmDialog -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmDialog[overload1]$$$QCtmDialogQWidget* -->
<h3 class="fn" id="QCtmDialog">QCtmDialog::<span class="name">QCtmDialog</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr)</h3>
<p>构造一个父窗口为 <i>parent</i> 的窗口对象.</p>
<!-- @@@QCtmDialog -->
<!-- $$$~QCtmDialog[overload1]$$$~QCtmDialog -->
<h3 class="fn" id="dtor.QCtmDialog"><code>[virtual] </code>QCtmDialog::<span class="name">~QCtmDialog</span>()</h3>
<p>销毁该窗口对象.</p>
<!-- @@@~QCtmDialog -->
<!-- $$$addMoveBar[overload1]$$$addMoveBarQWidget* -->
<h3 class="fn" id="addMoveBar"><span class="type">void</span> QCtmDialog::<span class="name">addMoveBar</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget">QWidget</a></span> *<i>moveBar</i>)</h3>
<p>添加鼠标可拖拽区域 <i>moveBar</i>, moveBar必须为该窗口的子控件之一.</p>
<p><b>See also </b><a href="qctmdialog.html#removeMoveBar">removeMoveBar</a>.</p>
<!-- @@@addMoveBar -->
<!-- $$$centralWidget[overload1]$$$centralWidget -->
<h3 class="fn" id="centralWidget"><span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget">QWidget</a></span> *QCtmDialog::<span class="name">centralWidget</span>() const</h3>
<p>返回中央窗口地址, 如果中央窗口不存在则返回nullptr.</p>
<p><b>See also </b><a href="qctmdialog.html#setCentralWidget">setCentralWidget</a>.</p>
<!-- @@@centralWidget -->
<!-- $$$eventFilter[overload1]$$$eventFilterQObject*QEvent* -->
<h3 class="fn" id="eventFilter"><code>[override virtual protected] </code><span class="type">bool</span> QCtmDialog::<span class="name">eventFilter</span>(<span class="type"><a href="https://doc.qt.io/qt/qobject.html#QObject">QObject</a></span> *<i>o</i>, <span class="type"><a href="https://doc.qt.io/qt/qevent.html">QEvent</a></span> *<i>e</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qdialog.html#eventFilter">QDialog::eventFilter</a>(QObject *o, QEvent *e).</p>
<!-- @@@eventFilter -->
<!-- $$$hideEvent[overload1]$$$hideEventQHideEvent* -->
<h3 class="fn" id="hideEvent"><code>[override virtual protected] </code><span class="type">void</span> QCtmDialog::<span class="name">hideEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qhideevent.html">QHideEvent</a></span> *<i>e</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qwidget.html#hideEvent">QWidget::hideEvent</a>(QHideEvent *event).</p>
<!-- @@@hideEvent -->
<!-- $$$nativeEvent[overload1]$$$nativeEventconstQByteArray&void*qintptr* -->
<h3 class="fn" id="nativeEvent"><code>[override virtual protected] </code><span class="type">bool</span> QCtmDialog::<span class="name">nativeEvent</span>(const <span class="type">QByteArray</span> &amp;<i>eventType</i>, <span class="type">void</span> *<i>message</i>, <span class="type"><a href="https://doc.qt.io/qt/qtglobal.html#qintptr-typedef">qintptr</a></span> *<i>result</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qwidget.html#nativeEvent">QWidget::nativeEvent</a>(const QByteArray &amp;eventType, void *message, qintptr *result).</p>
<!-- @@@nativeEvent -->
<!-- $$$removeMoveBar[overload1]$$$removeMoveBarQWidget* -->
<h3 class="fn" id="removeMoveBar"><span class="type">void</span> QCtmDialog::<span class="name">removeMoveBar</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget">QWidget</a></span> *<i>moveBar</i>)</h3>
<p>移除鼠标拖拽区域 <i>moveBar</i>.</p>
<p><b>See also </b><a href="qctmdialog.html#addMoveBar">addMoveBar</a>.</p>
<!-- @@@removeMoveBar -->
<!-- $$$setCentralWidget[overload1]$$$setCentralWidgetQWidget* -->
<h3 class="fn" id="setCentralWidget"><span class="type">void</span> QCtmDialog::<span class="name">setCentralWidget</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>)</h3>
<p>设置 <i>widget</i> 为窗口的中央窗口, 当 <i>widget</i> 为nullptr时删除中央窗口.</p>
<p><b>See also </b><a href="qctmdialog.html#centralWidget">centralWidget</a>.</p>
<!-- @@@setCentralWidget -->
<!-- $$$setTitleBar[overload1]$$$setTitleBarQCtmTitleBar* -->
<h3 class="fn" id="setTitleBar"><span class="type">void</span> QCtmDialog::<span class="name">setTitleBar</span>(<span class="type"><a href="qctmtitlebar.html">QCtmTitleBar</a></span> *<i>titleBar</i>)</h3>
<p>设置标题栏 <i>titleBar</i>, 当 <i>titleBar</i> 为 nullptr 时删除标题栏.</p>
<p><b>See also </b><a href="qctmdialog.html#titleBar">titleBar</a>.</p>
<!-- @@@setTitleBar -->
<!-- $$$titleBar[overload1]$$$titleBar -->
<h3 class="fn" id="titleBar"><span class="type"><a href="qctmtitlebar.html">QCtmTitleBar</a></span> *QCtmDialog::<span class="name">titleBar</span>() const</h3>
<p>返回窗口的标题栏，如果标题栏不存在，自动创建并返回一个新的标题栏.</p>
<p><b>See also </b><a href="qctmdialog.html#setTitleBar">setTitleBar</a>.</p>
<!-- @@@titleBar -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
